@extends('admin.layouts.master')

@section('content')
<div class="row aw-list">
	<div class="col-md-12">
		<section class="row form-inline aw-list-head">
			<div class="visible-xs-inline col-md-4"></div>
			<div class="col-sm-12 col-md-8">
				<div class="aw-head-search">
					<div class="form-group">
						<input type="text" class="form-control" id="title" name="title" v-model="form.title" :value="form.title" placeholder="输入手机号或昵称" v-on:keyup.enter="List_Search()">
					</div>
					<a class="btn btn-green" v-on:click="List_Search()"><i class="icon-search"></i> 搜索</a>
				</div>
			</div>
		</section>
	</div>
	<div class="col-lg-12">
		<section class="panel aw-content">
			<header class="panel-heading">会员列表</header>
			<table class="table table-striped dataTable table-hover">
				<thead>
					<tr>
						<th>ID</th>
						<th>昵称</th>
						<th>会员等级</th>
						<th>会员积分</th>
						<th>生日</th>
						<th>订场次数</th>
						<th>取消次数</th>
						<th>所属队伍</th>
						<th>注册时间</th>
						<th>状态</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<tr v-for="(list, key) in lists" :data-key="key" :data-id="list.id">
						<td>@{{list.id}}</td>
						<td>@{{list.nickname}}</td>
						<td>@{{list.vip_text}}</td>
						<td>@{{list.integral}}</td>
						<td>@{{list.birthday}}</td>
						<td>@{{list.num_booking}}</td>
						<td>@{{list.num_cancel}}</td>
						<td>@{{list.team_id_text}}</td>
						<td>@{{list.reg_time}}</td>
						<td>@{{list.status_text}}</td>
						<td>
							<a class="btn btn-blue btn-xs" :href="'/admin/user/info?page_id=4&id='+list.id">
								<i class="icon-file-text-alt"></i> 详情
							</a>
							<a class="btn btn-gules btn-xs" v-on:click="List_Status(list.id,2,'禁用',list.nickname)" v-if="list.status==1">
								<i class="icon-eye-close"></i> 禁用
							</a>
							<a class="btn btn-green btn-xs" v-on:click="List_Status(list.id,1,'启用',list.nickname)" v-if="list.status==2">
								<i class="icon-eye-open"></i> 启用
							</a>
						</td>
					</tr>
				</tbody>
			</table>
			<div class="aw-text-center aw-list-null" v-if="lists.length==0">暂无数据</div>
			<vue-page :page_item="page_item" :page_this="page_this" :page_all="page_all" :Call_back="Call_back"></vue-page>
		</section>
	</div>
</div>
@section('pagejs')
@parent

<!--日期插件-->
<script type="text/javascript" src="/admin/js/ga.js"></script>
<script type="text/javascript" src="/admin/assets/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>

<script type="text/javascript" src="/admin/js/vue-page.js"></script>
<script type="text/javascript" src="/admin/js/page.js"></script>
<script type="text/javascript">
var MJS_URLArry=URLArry;
var Get_form={
	page_id:'',title:'',
}
$.extend(Get_form,MJS_URLArry);
var AD_list={
	api:'/adminapi/user/user-list',
	form_data:Get_form,
	tips:false,
}
var Ajax_Vue_Fun=function(vue_data){
	console.log('vue_data')
	console.log(vue_data)
	var Data_Vue=ajax_data_res(vue_data)
	Data_Vue.form=Get_form;
	vm=new Vue({
		el:'#Vue-Body',
		data:Data_Vue,
		components:{
			'vue-page':Vpage
		},methods:{
			Call_back:function(page){
				Vm_Call_back_Page(page)
			},List_Status:function(id,status,tips,name){
				var AD_status={
					api:'/adminapi/user/user-status',
					form_data:{id:id,status:status},
					tips:tips+'用户 ['+name+'] 成功',
					msg:'是否'+tips+' ['+name+'] 该用户？',
				}
				Vm_List_Status(AD_status)
			},List_Search:function(){
				Vm_List_SearchText('用户',this.form)
			}
		}
	})
	URL_Make(vm.form)
}
getData(AD_list,Ajax_Vue_Fun)
</script>
@endsection

@endsection

